{include file="common:meta" /}
    <title>角色管理 - 管理员管理 - TXCMS_V2</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
</head>
<body>
{include file="common:header" /}

{include file="common:menu"/}

<section class="Hui-article-box">
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> <a href="{:url('index/index')}">首页</a> <span class="c-gray en">&gt;</span> 文章列表 <span class="c-gray en">&gt;</span> 分类列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="Hui-article">
        <article class="cl pd-20">
            <div class="cl pd-5 bg-1 bk-gray"> <span class="l"> <a class="btn btn-primary radius" href="javascript:;" onclick="article_cate_add('添加分类','/admin.php/admin/cate/add','800')"><i class="Hui-iconfont">&#xe600;</i> 添加分类</a> </span> </div>
            <div class="mt-10">
                <div class="table-responsive">
                <table class="table table-border table-bordered table-hover table-bg">
                    <thead>
                    <tr>
                        <th scope="col" colspan="6">分类列表</th>
                    </tr>
                    <tr class="text-c">
                        <th width="40">ID</th>
                        <th width="200">分类名称</th>
                        <th width="70">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name="data" id="vo"}
                    <tr class="text-c">
                        <td>{$vo.id}</td>
                        <td>{$vo.catename}</td>
                        <td class="f-14">
                            <a title="编辑" href="javascript:;" class="btn btn-success-outline radius size-MINI" onclick="article_cate_edit('角色编辑','/admin.php/admin/cate/edit?id={$vo.id}')" style="text-decoration:none">编辑</a>
                            <a title="删除" href="javascript:;" onclick="article_cate_del({$vo.id})" class="ml-5 btn btn-warning-outline radius size-MINI" style="text-decoration:none">删除</a></td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
                </div>
            </div>
        </article>
    </div>
</section>
{include file="common:footer" /}
<!--请在下方写此页面业务相关的脚本-->
{load href="__STATIC__/admin/lib/My97DatePicker/4.8/WdatePicker.js"}
{load href="__STATIC__/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"}
{load href="__STATIC__/admin/lib/laypage/1.2/laypage.js"}
<script type="text/javascript">
    /*文章-分类-添加*/
    function article_cate_add(title,url,w,h){
        layer_show(title,url,w,h);
    }
    /*文章-分类-编辑*/
    function article_cate_edit(title,url,id,w,h){
        layer_show(title,url,w,420);
    }
    /*文章-分类-删除*/
    function article_cate_del(id){
        $.post('/admin.php/admin/cate/del',{'id':id},function (res) {
            if(res.code=0){
                layer.msg(res.msg);
                setTimeout(function () {window.location.reload()},2000);
            }else{
                layer.msg(res.msg);
            }
        })
    }
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>